home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / chat / ircii-2.8he / ircii-2 / help / ON / serial_numbers < prev    next >
Encoding:
Text File  |  1993-05-04  |  2.1 KB  |  59 lines

  1. How to use SERIAL NUMBERS
  2.   This describes the use of serial numbers in ON functions, 
  3.   and is a direct extension of the basic ON help file.
  4.  
  5.   It is now possible to have more than one ON hook executed for
  6.   each event triggering a hook. This has been done by adding a
  7.   new serial number concept to the ON command. Each ON hook has
  8.   a serial number attached. Serial numbers can be any number
  9.   from -maxint to maxint, with the default being 0.
  10.  
  11.   When an event triggers a hook, IRCII now goes through the ON
  12.   hooks added for that event, and for each serial number used
  13.   by ON hooks in that hook type, finds the best match out of those
  14.   ON hooks which have that serial number and executes that ON
  15.   hook. The hooks are executed in order of serial number. Thus
  16.   if you set up the following set of MSG hooks.
  17.  
  18.           ON #^MSG -666 * echo Message coming:
  19.           ON ^MSG * echo Message from $0: $1-
  20.           ON #^MSG 666 * echo I got one, I got one!
  21.           ON #^MSG 666 WiZ echo WiZ hath spoken
  22.  
  23.   will cause the following to appear when you receive a message:
  24.  
  25.           Message coming:
  26.           Message from nick: text
  27.           I got one, I got one!
  28.  
  29.   And the following if you receive a message from WiZ:
  30.  
  31.           Message coming:
  32.           Message from WiZ: text
  33.           WiZ hath spoken
  34.  
  35.   The default serial number is 0, and the serial numbers are always
  36.   executed in order, starting with the lowest, and ending with the
  37.   highest.
  38.  
  39.   Although the '^' modifier can be used with any serial number,
  40.   it will only suppress the default action if used with serial
  41.   number 0. Thus if the only message hook you have is:
  42.  
  43.           ON #^MSG -666 * echo Incoming:
  44.  
  45.   You will see the following when you receive a message:
  46.  
  47.           Incoming:
  48.           *nick* text
  49.  
  50.   It is advisable to place any ON hooks which do not suppress the
  51.   default action in a serial number other than 0. In particular,
  52.   TIMER hooks, which are generally not intended to exclude other
  53.   TIMER hooks, should be placed at different serial numbers wherever
  54.   possible, and never on 0 (since 0 is the most likely place to
  55.   get a clash if anybody does use it).
  56.  
  57. See Also:
  58.   ON
  59.